<template>
    <el-menu :default-active="route.path" router>
        <el-menu-item
            v-for="item in routes[0].children"
            :key="item"
            :index="item.path"
            :disabled="!inited && item.name !== SETTINGS_PAGE"
        >
            <div>
                <el-icon><component :is="item.meta.icon"></component></el-icon>
            </div>
            <span>{{ item.meta.label }}</span>
        </el-menu-item>
    </el-menu>
</template>
 
 <script setup>
import { SETTINGS_PAGE } from '@/common/names'
import { routes } from '@/router/routes'

import { inject } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()

const inited = inject('inited')
</script>
 
 <style>
ul.el-menu {
    border-right: 0;
}
</style>
 